package javaapplication1;

import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;

public class BoardPanel extends JPanel{
    private Image image;
    
    @Override
    public void update(Graphics g){
        g.drawImage(image, 0, 0, this);
    }
    
    @Override
    public void paint (Graphics g){
        update(g);
    }
    
    public Image getImage(){
        return createImage(400,300);
    }

    public void setImage(Image image) {
        this.image = image;
    }
}
